package com.xiao.hao.controller.auth;


import com.xiao.hao.config.CheckParamsAnnotation;
import com.xiao.hao.constant.CheckParamsEnum;
import com.xiao.hao.facade.XhUserFileFacade;
import com.xiao.hao.req.XhUserFileInsertReq;
import com.xiao.hao.utils.BaseId;
import com.xiao.hao.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Description 用户附件表 controller层
 * @Author xiaohao
 * @Date 2025-03-05 17:57:41
 */

@Api(tags = "用户附件表控制层")
@RestController
@Slf4j
@RequestMapping("xhUserFile")
public class XhUserFileController {


    @Resource
    private XhUserFileFacade facade;

//    @ApiOperation(value = "新增")
//    @PostMapping("用户档案上传附件")
//    @CheckParamsAnnotation(CheckParamsEnum.INSERT_CHECK)
//    public Result upload(MultipartFile file) {
//        return facade.upload(file);
//    }

    @ApiOperation(value = "新增新增附件")
    @PostMapping("insert")
    @CheckParamsAnnotation(CheckParamsEnum.INSERT_CHECK)
    public Result insert(@RequestBody XhUserFileInsertReq req) {
        return facade.insert(req);
    }

    @PostMapping("delete")
    @ApiOperation(value = "删除")
    public Result delete(@RequestBody BaseId req) {
        return facade.delete(req);
    }

//    @ApiOperation(value = "分页查询")
//    @PostMapping("queryPage")
//    public PageResult queryPage(@RequestBody XhUserFileQueryPageReq req) {
//        return facade.queryPage(req);
//    }


}


